<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:rich="http://java.sun.com/jsf/composite"
      xml:lang="en" lang="en">
<title>发布课程</title>

<h:head>
    <link href="../../css/bootstrap.min.css" rel="stylesheet"/>
    <link href="../../css/font-awesome.css" rel="stylesheet"/>
    <link href="../../css/plugins/iCheck/custom.css" rel="stylesheet"/>
    <link href="../../css/animate.css" rel="stylesheet"/>
    <link href="../../css/style.css?v=4.1.0" rel="stylesheet"/>

    <!-- Data Tables -->
    <link href="../../css/style.css" rel="stylesheet"/>

    <style type="text/css">
        .control-label{
            width: 100px;
            margin-left: 50px;
            margin-top: 10px;
        }
    </style>
</h:head>

<h:body >
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-content">
                        <h:form>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">编号</label>
                                <div class="col-sm-10">
                                    <h:inputText value="#{course.id}" class="form-control"/><br/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">名称</label>
                                <div class="col-sm-10">
                                    <h:inputText value="#{course.name}" class="form-control"/><br/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">学分</label>
                                <div class="col-sm-10">
                                    <h:inputText value="#{course.credit}" class="form-control"/><br/>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-sm-2 control-label">名额</label>
                                <div class="col-sm-10">
                                    <h:inputText value="#{course.quota}" class="form-control"/><br/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">任课教师</label>
                                <div class="col-sm-10">
                                    <h:inputText value="#{course.teacher}" class="form-control"/><br/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">类别</label>
                                <div class="col-sm-10">
                                    <h:inputText value="#{course.category}" class="form-control"/><br/>
                                </div>
                            </div>

                            <div class="form-group">
                        <label class="col-sm-2 control-label">时间</label>
                                    <div class="col-sm-10">
                                        <h:inputText type="date" value="#{course.time}" class="form-control" /><br/>
                                    </div>
                                </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">周次</label>
                                <div class="col-sm-10">
                                    <h:inputText value="#{course.week}" class="form-control"/><br/>
                                </div>

                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">上课地点</label>
                                <div class="col-sm-10">
                                    <h:inputText value="#{course.address}" class="form-control"/><br/>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <h:commandButton action="#{course.insertCourse()}" class="btn btn-primary"
                                                     value="保存" style="margin-left: -120px"/>
                                </div>
                            </div>
                        </h:form>
                    </div>
                </div>
            </div>
        </div>
    </div>

<!-- 全局js -->
<script type="text/javascript" src="../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../js/bootstrap.min.js"></script>
</h:body>
</html>